#{extends 'clubuser.html' /}
#{set 'moreStyles' }
    <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/club.css'}">
    <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/profile.css'}">
#{/set}
#{set title:'New Member' /}


<div class="center" style="width: 400px">

#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}

<h2 class="title">Edit Member</h2>
<br />

<form method="post" action="@{Club.updateMember(member?.id)}" class="info">

	<table>
		<tr>
			<td>Name</td>
			<td>        #{field 'name'}
        <input type="text" name="${field.name}" 
            value="${member?.name}" class="text" />
        #{/field}</td>
		</tr>
		<tr>
			<td>Email</td>
			<td>        #{field 'email'}
        <input type="text" name="${field.name}" 
            value="${member?.email}" class="text" />
        #{/field}</td>
			
		</tr>
		<tr>
			<td>Home Town</td>
			<td>        #{field 'hometown'}
        <input type="text" name="${field.name}" 
            value="${member?.hometown}" class="text" />
        #{/field}</td>
			
		</tr>
		<tr>
			<td>Address</td>
			<td>        #{field 'address'}
        <textarea name="${field.name}" 
            class="text">${member?.address}</textarea>
        #{/field}</td>
			
		</tr>
		<tr>
			<td>Activation End Date</td>
			<td>        #{field 'activationEnds'}
        <input type="text" name="${field.name}" 
            value="${member?.stringActivationEnds}" class="text" />
        #{/field}</td>
			
		</tr>
	</table>
    
    <p>
    	<input class="button" type="submit" value="Update" />
		<input class="button" type="reset" value="Reset" />
    </p> 
</form>

<form method="post" action="@{Club.deleteMember(member?.id)}" class="info">
     <p>
    	<input class="button" type="submit" value="Delete" />
    </p> 
</form>

</div>